import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/manager',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/manager',
    method: 'put',
    data
  })
}

export function page(data) {
  return request({
    url: '/manager/page',
    method: 'post',
    data
  })
}

export function getById(id) {
  return request({
    url: '/manager/' + id,
    method: 'get'
  })
}

export function listByRole(roleType) {
  return request({
    url: '/manager/listByRole/' + roleType,
    method: 'get'
  })
}

export function filterName(roleType) {
  return request({
    url: '/manager/filterName/' + roleType,
    method: 'get'
  })
}

export function tagYZ(num) {
  return request({
    url: '/tag/list/' + 1,
    method: 'get'
  })
}

export function getTagyz(managerId) {
  return request({
    url: '/manager/getManagerTags',
    method: 'post',
    managerId
  })
}

export function saveTags(data) {
  return request({
    url: '/manager/updateTag',
    method: 'put',
    data
  })
}

export function saveTimeLine(data) {
  return request({
    url: '/timeline/',
    method: 'post',
    data
  })
}

export function getTimeLine(data) {
  return request({
    url: '/timeline/list/',
    method: 'get',
    params: data
  })
}

export function filterMobile(roleType) {
  return request({
    url: '/manager/filterMobile/' + roleType,
    method: 'get'
  })
}

export function pagelog(data) {
  return request({
    url: '/log/page',
    method: 'post',
    data
  })
}
export function pagelogSel(data) {
  return request({
    url: '/admin/list',
    method: 'get',
    params: data
  })
}

export function delManager(id) {
  return request({
    url: '/manager/' + id,
    method: 'delete'
  })
}

